package CreationalPatterns.Builder.product;

import CreationalPatterns.Builder.components.Engine;
import CreationalPatterns.Builder.components.TripComputer;

public abstract class Car {
    private Integer seatNumber;
    private Engine Engine;
    private TripComputer tripComputer;

    public Integer getSeatNumber() {
        return seatNumber;
    }

    public Car setSeatNumber(Integer seatNumber) {
        this.seatNumber = seatNumber;
        return this;
    }

    public CreationalPatterns.Builder.components.Engine getEngine() {
        return Engine;
    }

    public Car setEngine(CreationalPatterns.Builder.components.Engine engine) {
        Engine = engine;
        return this;
    }

    public TripComputer getTripComputer() {
        return tripComputer;
    }

    public Car setTripComputer(TripComputer tripComputer) {
        this.tripComputer = tripComputer;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Car{");
        sb.append("seatNumber=").append(seatNumber);
        sb.append(", Engine=").append(Engine);
        sb.append(", tripComputer=").append(tripComputer);
        sb.append('}');
        return sb.toString();
    }
}
